﻿define(function (require) {
    require('model/Feed');
    require('model/FeedList');
    var PopupView = require('view/PopupView');

    $(function () {
        var $_self = $(this);

        var popupView = new PopupView({ model: new FeedList });

        var NotificationManager = require('ezdesk/service/notification-manager');
        NotificationManager.start();
        NotificationManager.newFeedsCallback = function (newFeeds, feedsWithNewUpdateOn) {
            console.log('refresh notifications...');

            // 弹出新的feeds           
            popupView.model.add(feedsWithNewUpdateOn);
        };

    });
});
